import type { CascaderUpdateRegionModel, NodeLevel } from './cascader'

export interface CascaderModel {
  charts: CascaderUpdateRegionModel[] | null
}

export interface CascaderRegionModel {
  id: string
  name: string
  l1_nodes: CascaderNodeModel[] | null
  l2_nodes: CascaderNodeModel[] | null
}

export interface CascaderNodeModel {
  id: string
  name: string
  ips: string[]
  status: number
  run_status: number
  level: number
  resolve_status: number
  cache_switch: number
  cascade_level: number
  created_at: string
  updated_at: string
  region_id: string
  region_name: string

  source?: {
    // 原始索引
    index: number
    // 原始区域
    region: string
    // 原始层级
    level: NodeLevel
  }
}
